package gazzera.node.core.messages;

import gazzera.utils.*;

import java.io.*;


public class BrowseReplyFile extends Message
{
	public String parent;
	public Hash hash;
	public String name;
	public long size;
	public long timeStamp;
	
	
	
	public BrowseReplyFile()
	{
		super();
	}

	public BrowseReplyFile(String parent, Hash hash, String name, long size, long timeStamp)
	{
		super();
		this.parent = parent;
		this.hash = hash;
		this.name = name;
		this.size = size;
		this.timeStamp = timeStamp;
	}

	@Override
	protected void recv(DataInputStream s) throws IOException
	{
		parent = readString(s);
		hash = readHash(s);
		name = readString(s);
		size = readLong(s);
		timeStamp = readLong(s);
	}

	@Override
	protected void send(DataOutputStream s) throws IOException
	{
		sendString(s, parent);
		sendHash(s, hash);
		sendString(s, name);
		sendLong(s, size);
		sendLong(s, timeStamp);

	}

}
